from microbit import *

display.show(Image.HEART)
img = Image.HEART / 9
br = 9
while True:
    br = (br + display.read_light_level()*9/256)/2
    br = max(br, 3)
    display.show(img*br)
    sleep(500)